package org.youyun56.gpsserver.net;

import org.apache.log4j.Logger;
import org.apache.mina.core.filterchain.IoFilterAdapter;
import org.apache.mina.core.session.IoSession;

public class SessionFilter extends IoFilterAdapter {
    private final static Logger logger = Logger.getLogger(SessionFilter.class);

    @Override
    public void sessionClosed(NextFilter nextFilter, IoSession session) throws Exception {
        super.sessionClosed(nextFilter, session);
    }

    @Override
    public void sessionOpened(NextFilter nextFilter, IoSession session) throws Exception {
        super.sessionOpened(nextFilter, session);
        logger.info(String.format("Client %s Connected", session.getRemoteAddress().toString()));
    }
}
